//
//  newsListCell.m
//  项目一
//
//  Created by nick on 15/7/22.
//  Copyright (c) 2015年 nick. All rights reserved.
//

#import "newsListCell.h"
#import "UIImageView+WebCache.h"
@implementation newsListCell
- (void)setModal:(newsModal *)modal{
    _modal = modal;
    [self setNeedsLayout];
}
- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _image = [[UIImageView alloc]initWithFrame:self.bounds];
        _image.layer.cornerRadius = 20;
        _image.layer.borderWidth = 1;
        _image.layer.borderColor = [UIColor whiteColor].CGColor;
        _image.layer.masksToBounds = YES;
        
        [self.contentView addSubview:_image];
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [_image sd_setImageWithURL:[NSURL URLWithString:_modal.image]];
   // _image.backgroundColor = [UIColor whiteColor];
}
@end
